import 'package:flutter/material.dart';

class RowComp extends StatelessWidget {
  const RowComp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Row组件'), backgroundColor: Colors.red,),
      body: Center(
        child: Container(
          height: 100,
          color: Colors.cyan,
          child: Row(
            // 1. 主轴对齐方式
            // mainAxisAlignment: MainAxisAlignment.spaceAround,
            // mainAxisAlignment: MainAxisAlignment.spaceBetween,
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            // 2. 侧轴底气方式
            // crossAxisAlignment: CrossAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.center,
            // crossAxisAlignment: CrossAxisAlignment.end,
            children: [
              Image.network('https://yanxuan-item.nosdn.127.net/afd6199278a5b8fd783bc4947960fabc.jpg', width: 86),
              const Text('茶水分离杯耐热隔热玻璃杯')
            ],
          ),
        ),
      ),
    );
  }
}